<?php
namespace app\common\validate\Depot;

use think\Validate;

// 收货地址
class Supplier extends Validate
{
    protected $rule =   [
        'name'     => ['require', 'unique:depot_supplier'],
        'mobile'   => ['require', 'unique:depot_supplier'],
        'province' => 'require',
        'city'     => 'require',
        'district' => 'require',
        'address'  => 'require',
    ];

    protected $message  =   [
        'name.require'     => '供应商名称不能为空',
        'name.unique'      => '供应商名称重复',
        'mobile.require'   => '供应商手机号不能为空',
        'mobile.unique'    => '供应商手机号重复', 
        'province.require' => '省份不能为空',
        'city.require'     => '城市份不能为空',
        'district.require' => '区份不能为空',
        'address.require'  => '详细地址不能为空',
    ];
}